import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('user', () => {
/*   const count = ref(0)
  const doubleCount = computed(() => count.value * 2)
  function increment() {
    count.value++
  }
  return { user, doubleCount, increment } */
  const user = ref({
    username:'',
    role:''
  })
  /**  用户信息的跟新  **/
  function setUser(params) {
      user.value.username=params.username
      user.value.role=params.role
  }

})
